package com.dy.cloud.service;

import com.dy.cloud.service.impl.OrderHystrixServiceImpl;
import com.dy.cloud.util.ApiResousUtil;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @ClassName:
 * @Author: 仄言in
 * @Desctiption: (描述) @FeignClient(value = "CLOUDPROVIDERPAYMENT"):不解耦的降级处理，
 *@FeignClient(value = "CLOUDPROVIDERPAYMENT",fallback = OrderHystrixServiceImpl.class)：解耦的降级处理，每一个请求的接口都有自己的实现类，
 * 实现类的方法就是就是每个接口自己降级方法
 * @Date: 2021/9/15 17:11
 * @Version 1.0 (版本)
 */
//@FeignClient(value = "CLOUDPROVIDERPAYMENT")
@FeignClient(value = "CLOUDPROVIDERPAYMENT",fallback = OrderHystrixServiceImpl.class)
public interface OrderHystrixService {

    @GetMapping("/payment/ok/{id}")
    public ApiResousUtil payment_ok(@PathVariable("id") Integer id);
    @GetMapping("/payment/timout/{id}")
    public ApiResousUtil payment_timout(@PathVariable("id") Integer id);
    @GetMapping("/payment/list")
    public ApiResousUtil list();

}
